import { ref } from "vue";
import { getEnviromentInfo } from "@/api/robot-vehicle-log.js";

/*
 * @Author: ReinerLau lk850593913@gmail.com
 * @Date: 2022-09-26 08:40:24
 * @LastEditors: ReinerLau lk850593913@gmail.com
 * @LastEditTime: 2022-09-26 09:48:22
 * @FilePath: \robot\src\views\patroling\composables\useFence.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
export default () => {
  const columns5 = [
    {
      title: "创建时间",
      prop: "createTime",
    },
    {
      title: "经度",
      prop: "longitude",
    },
    {
      title: "纬度",
      prop: "latitude",
    },
    {
      title: "铁丝网破损",
      prop: "hole",
      formatter: true,
    },
    {
      title: "人员识别",
      prop: "person",
      formatter: true,
    },
    {
      title: "通知状态",
      prop: "notice",
      formatter: true,
    },
    {
      title: "通知时间",
      prop: "noticeTime",
    },
    {
      title: "图片",
      prop: "picPath",
      formatter: true,
    },
  ];

  const list5 = ref([]);

  async function getList() {
    const { data } = await getEnviromentInfo();
    list5.value = data.list;
  }
  getList();

  return {
    columns5,
    list5,
  };
};
